<template>
	<view class="zx-container flex-column" @click="itemClick(item._id)">

		<view class="zx-title">{{item.title}}</view>

		<view class="zx-bottom flex-row">

			<view v-if="item.auth" class="zx-font-size-24 zx-color-gray-6 flex-row" style="max-width: 200rpx;">
				{{item.auth + '：'}}
			</view>

			<view class="zx-font-size-24 zx-color-gray-6 flex-row flex-1">
				{{dayjs(item.createTime).format("YYYY-MM-DD")}}
			</view>

			<view-like-more :view_count="item.view_count" :like_count="item.like_count"></view-like-more>
		</view>
	</view>
</template>

<script setup>
	/**
	 * @property {Object} item 数据对象
	 */
	import dayjs from 'dayjs';
	defineProps({
		item: {
			type: Object,
			default: null
		}
	});

	function itemClick(paramters) {
		uni.navigateTo({
			url: '/pages/index/zixunxiangqing/zixunxiangqing?id=' + paramters
		})
	}
</script>

<style lang="scss" scoped>
	.zx-container {
		padding: 28rpx 40rpx;
		background-color: white;
		margin-top: 10rpx;
	}

	.zx-title {
		font-size: 32rpx;
		color: $me-color-gray-1;
	}

	.zx-bottom {
		margin-top: 10rpx;
	}

	.zx-font-size-24 {
		font-size: 24rpx;
	}

	.zx-color-gray-6 {
		color: $me-color-gray-6;
	}

	.zx-flex-row-align-center {
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}
</style>